//
//  SoapUtil.h
//  webservice
//
//  Created by lanyun on 16/3/30.
//  Copyright © 2016年 lanyun. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface SoapUtil : NSObject

/**
 *  发送webservice请求
 *
 *  @param nameSpace      命名空间名称
 *  @param endpoint       soap地址
 *  @param action         是否需要soapAction,C#传YES,Delphi传NO
 *  @param method         请求运行的函数
 *  @param parameters     参数
 *  @param uploadProgress 进度
 *  @param success        成功执行
 *  @param failure        失败执行
 *
 *  @return DataTask
 */
+ (nullable NSURLSessionDataTask *)SOAP:(NSString *)nameSpace
                      endpoint:(NSString *)endpoint
                        action:(BOOL)action
                        method:(NSString *)method
                    parameters:(nullable id)parameters
                      progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                       success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;

@end

NS_ASSUME_NONNULL_END
